package com.hyzx.qbasic.admin.domain.repository;

import com.github.pagehelper.PageInfo;
import com.hyzx.qbasic.admin.model.po.ResourceInfoPO;
import com.hyzx.qbasic.admin.model.po.ResourcePO;

import java.util.List;
import java.util.Set;

/**
 * Created by 黄江华 on 2017/10/9
 */

public interface IResourceRepository {
    List<ResourcePO> getAllResourceList();

    Set<String> getPermissionList(Set<String> roleList);

    Set<String> getPermittedUrlList(Set<String> roleList);

    List<ResourcePO> getMenuList(Set<String> roleList);

    List<ResourcePO> getFunctionList(Set<String> roleList);

    PageInfo<ResourceInfoPO> getPagedResourceList(int pageNum, int pageSize, String resourceName, Integer resourceId);

    boolean addResource(ResourcePO resource);

    ResourcePO getResourceInfo(int resourceId);

    boolean editResource(ResourcePO resource);

    boolean deleteResource(List<Integer> resourceIdList);

    List<Integer> getResourceRoles(String permission);
}
